// greencuisine

// Change Map Height
function changeHeight(mapID, heightID)
{
	var map = getElem(mapID);
	
	map.style.height = getElem(heightID).value + "px";
}

var home;

// Change Home Address
function changeHome(homeID, resultID)
{
	home = getElem(homeID);
	
	// map.js
	plotHome(home.value);
}

// Callback for change home
function changeHomeValid()
{
	home.className = 'valid';
	setTimeout('changeHomeNormal()', 1000);
}

// Callback for change home
function changeHomeInvalid()
{
	home.className = 'invalid';
	setTimeout('changeHomeNormal()', 1000);
}

// Callback for change home
function changeHomeNormal()
{
	home.className = 'normal';
}

// Converts number of $ to actual amounts
function betterDollars(signs)
{
	if(signs == '$') return '&lt; \$20 per person';
	else if(signs == '$$') return '\$21 - \$30 per person';
	else if(signs == '$$$') return '\$31 - \$40 per person';
	else if(signs == '$$$$') return '&gt; \$40 per person';
	else return '';
}
